package xyz.wangdanhua.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import xyz.wangdanhua.demo.model.User;

@RestController
public class HelloWorldController {

  @Value("${com.neo.title}")
  private String title;
  @Value("${com.neo.description}")
  private String description;

  @RequestMapping("/hello")
  public String index() {
    return "Hello World";
  }

  @RequestMapping("/getUser")
  public User getUser() {
    User user = new User();
    user.setUserName(title);
    user.setPassWord(description);
    return user;
  }

}
